package com.yst.sqlbuilder;

import com.yst.lambda.LambdaFuncUtils;
import com.yst.lambda.TableFieldFunc;

import java.util.Objects;

public interface IFieldExpression extends IExpression {
    TableFieldFunc<?,?> getField();
    default String getRealField(){
        if (Objects.nonNull(getEntitiesConfig())) {
            return getEntitiesConfig().getFieldName(getField());
        }
        return LambdaFuncUtils.getFieldName(getField());
    }
}
